/*
 * Copyright (c) 2018.
 * 北京九思金信科技有限公司对该文件内容保留所有权利。
 * 未经许可，不得私自拷贝、传播、发布、引用该文件内容，违者将被追究法律责任。
 */

import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/custInfo',
      name: 'CustomerMain',
      component: () => import('@/pages/pc/components/CustomerMain'),
      props: route => ({
        id: route.query.primaryKey,
        customerType: route.query.customerType
      })
    },
    //评级参数
    {
      path: '/indication',
      name: 'IndicationList',
      component: () => import('@/pages/pc/components/rating/indication/IndicationList'),
    },
    //评级模版
    {
      path: '/ratingTemplate',
      name: 'RatingTemplateList',
      component: () => import('@/pages/pc/components/rating/template/RatingTemplateList'),
    },
    {//客户评级
        path: '/customerRating',
        name: 'CustomerRatingList',
        component: () => import('@/pages/pc/components/rating/rating/CustomerRatingList'),
    },
    //客户移交
    {
      path: '/transferMain',
      name: 'transferMain',
      component: () => import('@/pages/pc/components/transfer/TransferMain')
    },
    {//客户移交流程表单--审批表单
      name: 'customerTransferCheckForm',
      path: '/transferFlowCheckForm',
      props: route => route.query,
      component: () => import('@/pages/pc/components/transfer/CustomerTransferFlowCheckForm')
    },
    {//客户移交流程表单--提交表单
      name: 'customerTransferSubmitForm',
      path: '/transferFlowSubmitForm',
      props: route => route.query,
      component: () => import('@/pages/pc/components/transfer/CustomerTransferSubmitForm')
    },
    {//客户移交流程表单--审批表单
      name: 'customerTransferFlowLegalForm',
      path: '/transferFlowLegalForm',
      props: route => route.query,
      component: () => import('@/pages/pc/components/transfer/CustomerTransferFlowLegalForm')
    },
    { // 单位客户详情
      name: 'CustomerCorpShow',
      path: '/custCorpShow',
      props: route => route.query,
      component: () => import('@/pages/pc/components/corp/CustomerCorpShow')
    },
    { // 个人客户详情
      name: 'customerPersonShow',
      path: '/custPersonShow',
      props: route => route.query,
      component: () => import('@/pages/pc/components/person/CustomerPersonShow')
    },
    //客户变更
    {
      name: 'CustomerChangeMain',
      path: '/custChange',
      component: () => import('@/pages/pc/components/change/CustomerChangeMain')
    },
    {//客户变更流程表单--提交表单
      name: 'customerChangeSubmitFlowForm',
      path: '/changeSubmitFlowForm',
      props: route => route.query,
      component: () => import('@/pages/pc/components/change/CustomerChangeSubmitFlowForm')
    },
    {//客户变更流程表单--审批表单
      name: 'customerChangeCheckFlowForm',
      path: '/changeCheckFlowForm',
      props: route => route.query,
      component: () => import('@/pages/pc/components/change/CustomerChangeCheckFlowForm')
    },
  ]
})
